﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ASEPMainProgram.Entities.Permission
{
    /// <summary>
    /// 角色管理：分配权限请求实体
    /// </summary>
    public class RequestPermissionModel
    {
        /// <summary>
        /// 选中的权限数组
        /// </summary>
        public List<string> Permissions { get; set; }
        /// <summary>
        /// 角色id
        /// </summary>
        public string roleId { get; set; }

        public RequestPermissionModel()
        {
            Permissions = new List<string>();
        }
    }


    public class RtnPermissionModel
    {
        /// <summary>
        /// 
        /// </summary>
        public List<string> SelectedPermissions { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<RtnPermissionTreeModel> Tree { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public RtnPermissionModel()
        {
            SelectedPermissions = new List<string>();

            Tree = new List<RtnPermissionTreeModel>();
        }

    }
    /// <summary>
    /// 
    /// </summary>
    public class RtnPermissionTreeModel
    {
        /// <summary>
        /// 
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<string> Permissions { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Expand { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Disabled { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool AllAssigned { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Guid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ParentGuid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<RtnPermissionTreeChildrenModel> Children { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public RtnPermissionTreeModel()
        {
            Children = new List<RtnPermissionTreeChildrenModel>();
        }

    }
    /// <summary>
    /// 
    /// </summary>
    public class RtnPermissionTreeChildrenModel
    {
        /// <summary>
        /// 
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<RtnPermissionTreeChildrenPermissionModel> Permissions { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool AllAssigned { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Disabled { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Expand { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Guid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ParentGuid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public RtnPermissionTreeChildrenModel()
        {
            Permissions = new List<RtnPermissionTreeChildrenPermissionModel>();
        }
    }
    /// <summary>
    /// 
    /// </summary>
    public class RtnPermissionTreeChildrenPermissionModel
    {
        /// <summary>
        /// 
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool IsAssignedToRole { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ActionCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Type { get; set; }
    }
}
